<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
<script src="https://cdn.bootcss.com/jquery/2.1.4/jquery.min.js"></script>
</head>

<body>
    <form>
        <input type='text' name='title' value='' id="title">
        <input type='button' value='Submit' id="btn">
    </form>
   <!-- 加载编辑器的容器 -->
    <script id="container" name="content" type="text/plain">
        这里写你的初始化内容
    </script>
    <!-- 配置文件 -->
    <script type="text/javascript" src="ueditor/ueditor.config.js"></script>
    <!-- 编辑器源码文件 -->
    <script type="text/javascript" src="ueditor/ueditor.all.js"></script>
    <!-- 实例化编辑器 -->
  



</body>

</html>

<script>
     var ue = UE.getEditor('container');
   $('#btn').click(function(){
       $.ajax({

        type: "post",

        url: "http://localhost:3000/hello",
        data:{
                "text":ue.getContent(),
                "title":$('#title').val()
        },

        beforeSend: function (XMLHttpRequest) {

            //ShowLoading();
        },
        success: function (data, textStatus) {
alert(1)


        }

    
    })
   })

</script>

